<?php
App::uses('AppModel', 'Model');
/**
 * Managedfund Model
 *
 */
class Managedfund extends AppModel {

/**
 * Primary key field
 *
 * @var string
 */
	public $primaryKey = 'FundsID';

/**
 * Display field
 *
 * @var string
 */
	public $displayField = 'FundsID';

/**
 * Validation Rules
 *
 * @var $name = 'Managedfund'
 */
	public $validate = array(
    	
    	'FundName' => array(
    		'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Please input the name of the Fund.'
        	),
    	),
        'APIRCode' => array(
    		'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Please input the APIR Code.'
            ),
        ),
		'Value' => array(
    		'notempty' => array(
                'rule' => array('notempty'),
        		'message' => 'Please input the Value.'
            ),
        ),  
        'Weighting' =>  array(
        	'range' => array(
        	'rule' => array('range', '0','101'),
        		'message' => 'The weighting percentage can only be between 0 to 100.'
    		), //need to allow for empty too....
    	),  	
        'OneMonthReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'ThreeMonthReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'SixMonthReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'OneYearReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'TwoYearReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'ThreeYearReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'FourYearReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'FiveYearReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),
        'SinceInceptionReturn' => array(
        	//'notempty' => array(
        	//	'rule' => array('notempty'),
        	//),
        ),

     );
}
